perform kernel density estimation
How to perform Kernel Density Estimation in Tensorflow
I'm trying to write a Kernel Density Estimation algorithm in Tensorflow. Later, when trying to predict the likelihood of a data point with respect to the model fitted above, for each data point I am evaluating, I am summing together the probability given by each of the kernels above: tf.reduce_sum([kernel._prob(X) for kernel in self.kernels], This approach only works when X is a numpy array, as TF doesn't let you iterate over a Tensor. My question is whether or not there is a way to make the algorithm above work with X as a tf.Tensor or tf.Variable?